﻿<Window x:Class="CECB.Team_Window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
                     Title="CECB - Team" 
                x:Name="Window"
        Width="611" Height="471"
         Background="#AA000000"
           WindowStartupLocation="CenterScreen" AllowsTransparency="True" WindowStyle="None" WindowState="Maximized" 
        mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">

    <Grid Height="420" Width="537" Margin="0,20,0,0">

        <Rectangle Margin="0,0,-22,12" Stroke="White" RadiusY="19.5" RadiusX="19.5" StrokeThickness="4">
            <Rectangle.Effect>
                <DropShadowEffect Direction="330" BlurRadius="24" ShadowDepth="13" />
            </Rectangle.Effect>
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0" />
                    <GradientStop Color="#FFA3A1A1" Offset="0.494" />
                    <GradientStop Color="#FF272121" Offset="0" />
                    <GradientStop Color="#FF272121" Offset="1" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Margin="23,0,-10,0" Width="524" Height="auto">
            <WrapPanel VerticalAlignment="Top" Height="50">
                <Label Content="Create a Project Team" Height="auto" HorizontalAlignment="Center" Margin="0,10,0,0"  VerticalAlignment="Center" Width="auto" FontSize="20" FontStretch="Normal" FontStyle="Normal" FontWeight="Black" Foreground="#FFEFEFEF"></Label>
                 
            </WrapPanel>
            <WrapPanel VerticalAlignment="Top" Orientation="Horizontal">
                
                <!--<TextBox Height="30" HorizontalAlignment="Left" Margin="200,7,0,0" Name="textBox_FirstName" VerticalAlignment="Top" Width="230" FontSize="14" Foreground="#FF4E0000" />-->
                <Label Content="Team Name" Height="28" Name="label1" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" Width="175" />
                <toolkit:AutoCompleteBox Name="TeamAutocompleteTextBox" Width="230" Margin="0,0,0,0" Height="30"  ValueMemberPath="team_name"  FilterMode="Contains"  ItemsSource="{Binding}"  TabIndex="1" IsTabStop="True"  SelectionChanged="TeamReferenceTextBox_SelectionChanged" FontSize="18" Background="#FFFFE8A6" Opacity="1" HorizontalAlignment="Center" UseLayoutRounding="False" BorderBrush="#FFF8F8F8" BorderThickness="2">
                    <toolkit:AutoCompleteBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Path=team_reference}"/>
                                <TextBlock Text=" - "/>
                                <TextBlock Text="{Binding Path=team_name}"/>

                            </StackPanel>
                        </DataTemplate>
                    </toolkit:AutoCompleteBox.ItemTemplate>
                </toolkit:AutoCompleteBox>
            </WrapPanel>
            <WrapPanel VerticalAlignment="Top">
                <ComboBox Height="30" HorizontalAlignment="Left" Margin="200,7,0,0" Name="combobox_TeamLeader" VerticalAlignment="Top" Width="230" FontSize="14" Foreground="#FF4E0000" DisplayMemberPath="mem_name" SelectedValuePath="mem_reference"/>
                <Label Content="Team Leader" Height="28" Name="label2" HorizontalAlignment="Left" Margin="25,-28,80,0" VerticalAlignment="Center" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" />
            </WrapPanel>           
            <WrapPanel Height="215">
                <StackPanel Orientation="Vertical" Width="524">
                    <Label Content="Team Members" Height="28" Name="label4" HorizontalAlignment="Left" Margin="25,0,0,0" VerticalAlignment="Top" FontSize="14" FontStyle="Italic" FontWeight="Medium" Foreground="White" BorderThickness="0" BorderBrush="White" Width="143" />
                    <ListBox Name="listBoxTeamMembers" Height="180" Width="467" Margin="0,10,0,0" SelectionMode="Multiple" Background="#FFFFE8A6">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <WrapPanel Orientation="Horizontal">
                                    <CheckBox Content="{Binding mem_name}" FontSize="14" Height="30" Width="270"  IsChecked="{Binding Path=IsSelected,  RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"/>
                                    <Label  Content=" => " FontSize="14" Height="30" Width="10"  Margin="0,-10,0,0" />

                                    <ComboBox Visibility="Hidden" x:Name="comboboxMemSpec" Width="150" DisplayMemberPath="Specilizations.spec_name" SelectedValuePath="spec_reference" DropDownOpened="comboboxMemSpec_DropDownOpened"  ></ComboBox>
                                </WrapPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </StackPanel>
            </WrapPanel>
        </StackPanel>
        <StackPanel Name="stackPanel14" Orientation="Horizontal" Margin="0,350,12,12" HorizontalAlignment="Right" ClipToBounds="False" Width="109">

            <Button Background="{x:Null}" BorderBrush="White" Click="SaveButton_Click" Height="44" Margin="2,0" Name="SaveButton" Width="98">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Image Grid.Column="0" Height="32" Margin="2" Source="/CECB;component/images/Save.png" Width="32" />
                    <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                        <TextBlock Margin="0" Foreground="White" Padding="0" Text="Save" TextWrapping="NoWrap" />
                    </StackPanel>
                </Grid>
            </Button>
            <Button Visibility="Hidden" Background="{x:Null}" BorderBrush="White" Click="CloseButton_Click" Height="44" Margin="2,0" Name="CloseButton" Width="98">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Image Grid.Column="0" Height="32" Margin="2" Source="images\close.png" Width="32" />
                    <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                        <TextBlock Margin="0" Padding="0" Foreground="White" Text="Delete" TextWrapping="NoWrap" />
                    </StackPanel>
                </Grid>
            </Button>
        </StackPanel>
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="120,476,0,0" Name="comboBox1" VerticalAlignment="Top" Width="120" />
        <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,12,14,0">
            <Image Height="32" Margin="2" Source="/CECB;component/images/closeblack.png"  Width="32" MouseLeftButtonDown="Image_MouseLeftButtonDown" />
        </Grid>
    </Grid>
   
</Window>
